package com.zebra.demo.person.view;


import com.baomidou.mybatisplus.annotation.TableField;
import com.zebra.base.anno.GroupBy;
import com.zebra.base.anno.OrderBy;
import com.zebra.base.anno.SimpleQuery;
import com.zebra.base.anno.type.FuncType;
import com.zebra.base.anno.type.RangeType;
import com.zebra.base.anno.type.RelationStrategy;
import com.zebra.base.anno.type.SortType;
import com.zebra.base.vo.BaseForm;
import com.zebra.base.vo.QueryForm;
import com.zebra.demo.person.entity.DemoPerson;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.transaction.annotation.Transactional;

import java.beans.Transient;
import java.util.Date;
import java.util.List;

/**
 * @ClassName DemoPersonFrom
 * @Description TODO 描写类的含义
 * @Author 消魂钉
 * @Date 5/29 0029 15:59
 */
@Data
@NoArgsConstructor
public class DemoPersonForm extends QueryForm<DemoPerson> {
    @ApiModelProperty(value = "性别",name = "sex")
    @SimpleQuery()
    private Integer sex;
    @ApiModelProperty(value = "姓名",name = "name")
    @OrderBy()
    @SimpleQuery(name = "name",formula = FuncType.LK,range = RangeType.START,priority = 1)
    private String name;
    @SimpleQuery(name = "resume",formula = FuncType.LK,relation = RelationStrategy.OR,range = RangeType.END,priority = 2)
    @OrderBy(sort = SortType.DESC,priority = 1)
    @GroupBy
    private String resume;
    @ApiModelProperty(value = "学历", name = "education")
    private Integer education;
    @SimpleQuery(name = "name",formula = FuncType.IN,priority = 3)
    private List<String> inName;

    public DemoPersonForm(Integer sex, String name, String resume, Integer education) {
        this.sex = sex;
        this.name = name;
        this.resume = resume;
        this.education = education;
    }
}
